Skip to content

Conversation

@AlejandraPedroza
Copy link
Contributor

No description provided.

@AlejandraPedroza AlejandraPedroza requested a review from a team as a code owner November 20, 2025 17:11
Copy link
Collaborator

@koshachy koshachy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to suggest some changes.
Feel free to contact me for details.
Cheers!


Since Kotlin 2.0.0, we have introduced support for the new version of Wasm [exception handling proposal](https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md) within Kotlin/Wasm.
The [`wasmJs` target](wasm-overview.md#kotlin-wasm-and-compose-multiplatform) uses the legacy exception handling proposal by default.
The new proposal is turned off for this target, but
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous sentence already stated that the wasmJS uses the legacy exception handilng proposal.
Maybe we could rephrase the second part as

"To enable the new proposal for wasmJs target, use the ... compiler option."

This update ensures the new exception handling proposal aligns with Kotlin requirements, enabling the use of Kotlin/Wasm on virtual machines that only support the latest version of the proposal.
The [`wasmWasi` target](wasm-overview.md#kotlin-wasm-and-wasi) uses the new proposal by default,
ensuring better compatibility with modern WebAssembly runtimes.
You can manually switch to the old proposal by
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To switch to the old (is it old or legacy? what is the right name?) proposal, use the ... compiler option"

On Kotlin/Wasm targets, fully qualified names (FQNs) are available at runtime without any additional configuration.
This means that the `KClass.qualifiedName` property is enabled by default.

Having FQNs improves code portability from JVM to Wasm targets and makes runtime errors more informative by displaying
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to use more common verbs here:

Using FQNs improves code portability from JVM to Wasm targets and makes runtime errors more informative by showing the full qualified name.

WDYT?


Currently, Kotlin/Wasm supports WASI 0.1, also known as Preview 1.
[Support for WASI 0.2 is planned for future releases](https://youtrack.jetbrains.com/issue/KT-64568).
[Support for WASI 0.2 is planned for future releases](https://youtrack.jetbrains.com/issue/KT-64568).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's explain better what behind the link. Smth like:

Follow this YouTrack issue for updates on WASI 0.2 support.

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants